import 'package:cat_eye/base/base_view_model.dart';
import 'package:cat_eye/bean/home_body_bean.dart';
import 'package:cat_eye/config/url_config.dart';
import 'package:flutter/material.dart';

/*
* @Package: view_model.find_view_model
* @ClassName: find_special_details_view_model
* @Author: szj
* @CreateDate: 8/4/21 2:26 PM
* TODO 发现-专题-详情ViewModel
*/
class FindSpecialDetailsViewModel extends BaseViewModel {
  int id;

  List<ItemList> itemList = [];

  IssueList issue = IssueList();

  FindSpecialDetailsViewModel(this.id);

  @override
  String get httpUrl => "${UrlConfig.topicsDetailUrl}$id";

  @override
  void successJsonData(json) {
    issue = IssueList.fromJson(json);
    itemList.addAll(issue.itemList);
  }
}
